class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: H = None
        self.o: I = None
        self.t: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: C = None
        self.q: B = None
        self.u: A = None
        self.p: A = None
        self.t: E = None
        self.y: I = None
        self.z: G = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.r: E = None
        self.z: B = None
        self.v: I = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

h = A("h")
c = B("c")
d = C("d")
j = D("j")
k = E("k")
b = F("b")
l = G("l")
f = H("f")
g = I("g")

h.o = j
c.p = j
c.t = j
c.z = f
c.y = f
c.o = g
d.u = f
j.w = l
j.z = l
j.s = d
j.q = c
j.u = h
j.p = h
j.t = k
j.r = k
j.y = g
k.t = d
k.p = g
b.s = k
b.p = d
l.y = d
l.q = c
l.z = c
l.r = k
l.v = g
l.o = j
f.t = k
g.v = f
g.u = f
g.x = k
g.z = b
assert f.t.p.u.t.p.v.t.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: H = None
        self.o: I = None
        self.t: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: C = None
        self.q: B = None
        self.u: A = None
        self.p: A = None
        self.t: E = None
        self.y: I = None
        self.z: G = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.r: E = None
        self.z: B = None
        self.v: I = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

h = A("h")
c = B("c")
d = C("d")
j = D("j")
k = E("k")
b = F("b")
l = G("l")
f = H("f")
g = I("g")

h.o = j
c.p = j
c.t = j
c.z = f
c.y = f
c.o = g
d.u = f
j.w = l
j.z = l
j.s = d
j.q = c
j.u = h
j.p = h
j.t = k
j.r = k
j.y = g
k.t = d
k.p = g
b.s = k
b.p = d
l.y = d
l.q = c
l.z = c
l.r = k
l.v = g
l.o = j
f.t = k
g.v = f
g.u = f
g.x = k
g.z = b
assert f.t.p.u.t.p.v.t.p.x.txt == "k"