class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.s: A = None
        self.v: E = None
        self.txt = txt

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

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

j = A("j")
l = B("l")
i = C("i")
f = D("f")
m = E("m")
b = F("b")
k = C("k")
h = C("h")
g = A("g")
a = C("a")

j.t = a
j.r = f
j.x = g
j.v = m
l.r = m
i.s = f
i.q = f
i.r = m
i.u = b
i.y = b
f.p = b
f.o = m
f.v = m
f.s = g
m.x = b
m.t = f
b.v = f
b.u = i
k.s = f
k.q = f
k.r = m
k.u = b
k.y = b
h.s = f
h.q = f
h.r = m
h.u = b
h.y = b
g.t = h
g.r = f
g.x = j
g.v = m
a.s = f
a.q = f
a.r = m
a.u = b
a.y = b
assert b.u.q.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.s: A = None
        self.v: E = None
        self.txt = txt

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

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

j = A("j")
l = B("l")
i = C("i")
f = D("f")
m = E("m")
b = F("b")
k = C("k")
h = C("h")
g = A("g")
a = C("a")

j.t = a
j.r = f
j.x = g
j.v = m
l.r = m
i.s = f
i.q = f
i.r = m
i.u = b
i.y = b
f.p = b
f.o = m
f.v = m
f.s = g
m.x = b
m.t = f
b.v = f
b.u = i
k.s = f
k.q = f
k.r = m
k.u = b
k.y = b
h.s = f
h.q = f
h.r = m
h.u = b
h.y = b
g.t = h
g.r = f
g.x = j
g.v = m
a.s = f
a.q = f
a.r = m
a.u = b
a.y = b
assert b.u.q.v.x.txt == "b"