class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: E = None
        self.p: D = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: E = None
        self.v: E = None
        self.q: A = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: E = None
        self.v: E = None
        self.q: A = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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