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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.w: B = None
        self.u: A = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.w: B = None
        self.u: A = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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