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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: A = None
        self.s: E = None
        self.x: C = None
        self.r: D = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.y: D = None
        self.txt = txt

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

a.r = f
a.z = i
a.o = d
d.z = f
d.y = a
d.s = h
d.x = e
d.u = e
d.r = j
e.u = a
j.w = e
j.p = k
i.x = j
b.o = k
b.y = a
b.u = j
k.x = b
k.z = c
k.y = j
h.x = j
f.z = d
f.y = a
f.s = h
f.x = e
f.u = e
f.r = j
c.x = b
c.z = k
c.y = j
assert e.u.r.r.p.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: A = None
        self.s: E = None
        self.x: C = None
        self.r: D = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.y: D = None
        self.txt = txt

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

a.r = f
a.z = i
a.o = d
d.z = f
d.y = a
d.s = h
d.x = e
d.u = e
d.r = j
e.u = a
j.w = e
j.p = k
i.x = j
b.o = k
b.y = a
b.u = j
k.x = b
k.z = c
k.y = j
h.x = j
f.z = d
f.y = a
f.s = h
f.x = e
f.u = e
f.r = j
c.x = b
c.z = k
c.y = j
assert e.u.r.r.p.y.w.txt == "e"