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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: D = None
        self.q: 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.z: I = None
        self.q: G = None
        self.s: I = None
        self.p: G = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.o: D = None
        self.z: E = None
        self.u: I = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: I = None
        self.r: D = None
        self.s: D = None
        self.t: G = None
        self.v: G = None
        self.x: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.t: D = None
        self.v: F = None
        self.y: F = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

g = A("g")
j = B("j")
a = C("a")
i = D("i")
b = E("b")
h = F("h")
c = G("c")
e = H("e")
m = I("m")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: D = None
        self.q: 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.z: I = None
        self.q: G = None
        self.s: I = None
        self.p: G = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.o: D = None
        self.z: E = None
        self.u: I = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: I = None
        self.r: D = None
        self.s: D = None
        self.t: G = None
        self.v: G = None
        self.x: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.t: D = None
        self.v: F = None
        self.y: F = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

g = A("g")
j = B("j")
a = C("a")
i = D("i")
b = E("b")
h = F("h")
c = G("c")
e = H("e")
m = I("m")

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