class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.u: C = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.v: F = None
        self.y: C = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.u: C = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.v: F = None
        self.y: C = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

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

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

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