class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.w: E = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.x: E = None
        self.r: E = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.z: C = None
        self.q: F = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

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

b.r = i
b.u = i
b.x = a
i.u = n
i.p = a
i.v = b
j.r = m
j.x = h
j.w = e
j.s = n
n.u = h
n.t = f
n.w = j
l.s = e
l.x = e
l.r = e
l.u = a
l.q = i
l.z = h
f.u = m
f.q = m
f.v = m
f.t = l
f.z = j
f.s = b
h.r = f
h.x = j
h.w = e
h.s = n
e.s = l
e.x = l
e.r = l
e.u = b
e.q = i
e.z = h
a.r = i
a.u = i
a.x = b
m.u = f
m.q = f
m.v = f
m.t = l
m.z = h
m.s = a
assert i.u.t.t.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.w: E = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.x: E = None
        self.r: E = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.z: C = None
        self.q: F = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

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

b.r = i
b.u = i
b.x = a
i.u = n
i.p = a
i.v = b
j.r = m
j.x = h
j.w = e
j.s = n
n.u = h
n.t = f
n.w = j
l.s = e
l.x = e
l.r = e
l.u = a
l.q = i
l.z = h
f.u = m
f.q = m
f.v = m
f.t = l
f.z = j
f.s = b
h.r = f
h.x = j
h.w = e
h.s = n
e.s = l
e.x = l
e.r = l
e.u = b
e.q = i
e.z = h
a.r = i
a.u = i
a.x = b
m.u = f
m.q = f
m.v = f
m.t = l
m.z = h
m.s = a
assert i.u.t.t.q.v.txt == "b"