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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.u: F = None
        self.w: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.x: C = None
        self.v: A = None
        self.o: A = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.txt = txt

b = A("b")
d = B("d")
h = C("h")
k = D("k")
j = E("j")
f = F("f")
m = G("m")
e = H("e")
l = B("l")

b.y = d
b.v = l
d.v = f
d.r = f
d.q = j
d.y = j
d.w = m
d.z = m
h.v = e
h.u = e
h.t = d
h.z = j
h.x = j
h.p = l
k.s = e
k.z = f
k.u = f
k.w = b
k.r = m
j.t = l
j.u = k
j.x = h
j.v = b
j.o = b
j.p = m
j.q = m
f.u = k
f.x = l
f.v = j
m.r = k
m.q = k
e.w = j
e.p = j
l.v = f
l.r = f
l.q = j
l.y = j
l.w = m
l.z = m
assert m.q.z.u.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.u: F = None
        self.w: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.x: C = None
        self.v: A = None
        self.o: A = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.txt = txt

b = A("b")
d = B("d")
h = C("h")
k = D("k")
j = E("j")
f = F("f")
m = G("m")
e = H("e")
l = B("l")

b.y = d
b.v = l
d.v = f
d.r = f
d.q = j
d.y = j
d.w = m
d.z = m
h.v = e
h.u = e
h.t = d
h.z = j
h.x = j
h.p = l
k.s = e
k.z = f
k.u = f
k.w = b
k.r = m
j.t = l
j.u = k
j.x = h
j.v = b
j.o = b
j.p = m
j.q = m
f.u = k
f.x = l
f.v = j
m.r = k
m.q = k
e.w = j
e.p = j
l.v = f
l.r = f
l.q = j
l.y = j
l.w = m
l.z = m
assert m.q.z.u.u.v.txt == "j"