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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.o: H = None
        self.r: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.q: A = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.s: C = None
        self.v: D = None
        self.o: G = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.o: H = None
        self.r: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.q: A = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.s: C = None
        self.v: D = None
        self.o: G = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.txt = txt

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

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