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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: E = None
        self.w: D = None
        self.u: G = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.y: J = None
        self.z: D = None
        self.w: B = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: G = None
        self.r: H = None
        self.p: A = None
        self.t: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: D = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.v: C = None
        self.x: F = None
        self.o: B = None
        self.t: E = None
        self.q: J = None
        self.s: D = None
        self.r: G = None
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.q: G = None
        self.r: H = None
        self.t: E = None
        self.y: H = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

f = A("f")
i = B("i")
c = C("c")
g = D("g")
e = E("e")
b = F("b")
m = G("m")
d = H("d")
k = I("k")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: E = None
        self.w: D = None
        self.u: G = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.y: J = None
        self.z: D = None
        self.w: B = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: G = None
        self.r: H = None
        self.p: A = None
        self.t: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: D = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.v: C = None
        self.x: F = None
        self.o: B = None
        self.t: E = None
        self.q: J = None
        self.s: D = None
        self.r: G = None
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.q: G = None
        self.r: H = None
        self.t: E = None
        self.y: H = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

f = A("f")
i = B("i")
c = C("c")
g = D("g")
e = E("e")
b = F("b")
m = G("m")
d = H("d")
k = I("k")
h = J("h")

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