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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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