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

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

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

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

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

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

j = A("j")
m = B("m")
f = C("f")
h = D("h")
a = E("a")
i = F("i")
n = D("n")
k = B("k")
l = B("l")

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

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

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

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

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

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

j = A("j")
m = B("m")
f = C("f")
h = D("h")
a = E("a")
i = F("i")
n = D("n")
k = B("k")
l = B("l")

j.w = f
j.z = f
j.t = f
j.x = h
j.q = a
m.x = a
m.u = j
m.p = j
m.r = i
f.u = a
f.s = a
f.v = a
f.t = h
f.x = i
h.y = i
h.v = k
h.u = n
a.q = j
i.o = h
i.z = l
n.y = i
n.v = k
n.u = h
k.x = a
k.u = j
k.p = j
k.r = i
l.x = a
l.u = j
l.p = j
l.r = i
assert j.q.q.z.s.q.q.q.q.txt == "a"