class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.y: D = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.p: C = None
        self.r: C = None
        self.s: C = None
        self.q: A = None
        self.x: F = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
h = D("h")
a = E("a")
k = F("k")
g = G("g")
e = C("e")

f.r = e
f.q = k
f.y = h
f.v = c
f.p = c
c.p = k
c.z = a
c.x = a
c.o = a
c.y = f
c.t = g
c.w = h
d.p = e
d.o = a
d.z = a
d.u = h
d.r = g
h.t = c
h.z = d
a.t = f
a.x = k
k.s = d
k.w = d
k.x = h
g.u = f
g.q = f
g.y = c
g.p = e
g.r = d
g.s = d
g.x = k
e.p = d
e.o = a
e.z = a
e.u = h
e.r = g
assert e.o.x.x.t.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.y: D = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.p: C = None
        self.r: C = None
        self.s: C = None
        self.q: A = None
        self.x: F = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
h = D("h")
a = E("a")
k = F("k")
g = G("g")
e = C("e")

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