class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: B = None
        self.w: A = None
        self.r: B = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: B = None
        self.w: A = None
        self.r: B = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: B = None
        self.txt = txt

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

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