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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: A = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: A = None
        self.z: E = None
        self.w: F = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.s: A = None
        self.u: C = None
        self.x: G = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.p: A = None
        self.w: B = None
        self.y: A = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

c = A("c")
i = B("i")
j = C("j")
m = D("m")
d = E("d")
e = F("e")
a = G("a")
b = A("b")
k = F("k")

c.u = j
c.z = j
c.p = a
c.q = d
c.r = e
c.o = e
i.z = d
i.v = d
i.u = j
i.t = c
j.q = d
j.t = d
j.r = c
j.o = i
m.p = d
m.z = d
m.u = d
m.r = c
m.w = e
m.t = b
d.w = b
d.s = b
d.z = m
d.u = j
d.x = a
d.o = e
e.q = k
e.u = c
e.r = c
e.s = d
a.r = m
a.o = m
a.p = c
a.w = i
a.y = b
a.x = j
a.v = j
b.u = j
b.z = j
b.p = a
b.q = d
b.r = k
b.o = e
k.q = e
k.u = c
k.s = d
k.r = b
assert a.x.r.z.t.o.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.q: E = None
        self.z: C = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: A = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: A = None
        self.z: E = None
        self.w: F = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.s: A = None
        self.u: C = None
        self.x: G = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.p: A = None
        self.w: B = None
        self.y: A = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

c = A("c")
i = B("i")
j = C("j")
m = D("m")
d = E("d")
e = F("e")
a = G("a")
b = A("b")
k = F("k")

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