class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.w: A = None
        self.v: E = None
        self.z: C = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.p: G = None
        self.s: H = None
        self.r: E = None
        self.x: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: H = None
        self.z: B = None
        self.v: E = None
        self.p: E = None
        self.q: B = None
        self.r: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

a = A("a")
h = B("h")
f = C("f")
j = D("j")
n = E("n")
e = F("e")
b = G("b")
g = H("g")
l = A("l")
i = H("i")

a.t = b
a.r = e
a.w = l
a.v = n
a.z = f
a.u = i
h.y = j
h.o = g
h.x = n
f.w = n
j.o = g
j.r = n
n.q = j
n.z = e
e.q = f
e.z = b
e.p = b
e.s = i
e.r = n
e.x = j
e.u = l
b.y = n
b.v = n
b.p = n
b.o = g
b.r = g
b.z = h
b.q = h
b.u = h
g.r = b
g.z = l
g.q = h
l.t = b
l.r = e
l.w = a
l.v = n
l.z = f
l.u = i
i.r = b
i.z = l
i.q = h
assert e.z.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.w: A = None
        self.v: E = None
        self.z: C = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.p: G = None
        self.s: H = None
        self.r: E = None
        self.x: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: H = None
        self.z: B = None
        self.v: E = None
        self.p: E = None
        self.q: B = None
        self.r: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

a = A("a")
h = B("h")
f = C("f")
j = D("j")
n = E("n")
e = F("e")
b = G("b")
g = H("g")
l = A("l")
i = H("i")

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