class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.v: D = None
        self.p: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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