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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: D = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.o: C = None
        self.x: A = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: D = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.o: C = None
        self.x: A = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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