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

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

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

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

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

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

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

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

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

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

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

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

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

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

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