class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.u: A = None
        self.v: F = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

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

n.q = j
h.s = m
h.u = d
l.x = m
l.s = d
l.z = i
l.v = i
d.r = n
d.u = n
d.y = j
d.v = c
d.o = h
d.z = b
j.w = f
j.u = m
j.r = l
j.z = d
j.y = b
c.q = d
c.s = l
c.t = l
c.w = m
c.y = i
f.q = b
f.s = l
f.w = m
f.t = m
f.y = h
i.s = m
i.u = b
m.x = l
m.s = b
m.z = i
m.v = i
b.r = n
b.u = n
b.y = j
b.v = f
b.o = h
b.z = d
assert j.r.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.u: A = None
        self.v: F = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

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

n.q = j
h.s = m
h.u = d
l.x = m
l.s = d
l.z = i
l.v = i
d.r = n
d.u = n
d.y = j
d.v = c
d.o = h
d.z = b
j.w = f
j.u = m
j.r = l
j.z = d
j.y = b
c.q = d
c.s = l
c.t = l
c.w = m
c.y = i
f.q = b
f.s = l
f.w = m
f.t = m
f.y = h
i.s = m
i.u = b
m.x = l
m.s = b
m.z = i
m.v = i
b.r = n
b.u = n
b.y = j
b.v = f
b.o = h
b.z = d
assert j.r.z.u.txt == "b"