class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: F = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

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

c.o = k
c.q = k
c.t = b
c.v = h
b.v = h
b.x = j
b.y = d
b.p = k
n.o = b
n.v = h
k.x = l
k.v = d
d.y = n
d.q = h
d.u = b
j.s = k
j.z = k
j.o = l
j.p = l
j.y = c
j.q = h
h.y = n
h.q = d
h.u = b
l.s = k
l.z = k
l.o = j
l.p = j
l.y = c
l.q = d
assert c.o.v.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: F = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

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

c.o = k
c.q = k
c.t = b
c.v = h
b.v = h
b.x = j
b.y = d
b.p = k
n.o = b
n.v = h
k.x = l
k.v = d
d.y = n
d.q = h
d.u = b
j.s = k
j.z = k
j.o = l
j.p = l
j.y = c
j.q = h
h.y = n
h.q = d
h.u = b
l.s = k
l.z = k
l.o = j
l.p = j
l.y = c
l.q = d
assert c.o.v.q.u.txt == "b"