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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: C = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.r: F = None
        self.s: H = None
        self.p: G = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: C = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: G = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.u: A = None
        self.v: G = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: B = None
        self.q: A = None
        self.u: G = None
        self.w: B = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
a = B("a")
j = C("j")
k = D("k")
f = E("f")
d = F("d")
e = G("e")
n = H("n")
i = A("i")
m = G("m")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: C = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.r: F = None
        self.s: H = None
        self.p: G = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: C = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: G = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.u: A = None
        self.v: G = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: B = None
        self.q: A = None
        self.u: G = None
        self.w: B = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
a = B("a")
j = C("j")
k = D("k")
f = E("f")
d = F("d")
e = G("e")
n = H("n")
i = A("i")
m = G("m")

b.w = i
b.t = d
b.q = d
a.x = j
a.z = j
a.p = j
a.r = n
j.q = a
j.w = d
j.r = d
j.s = n
j.p = m
j.u = k
k.q = n
k.s = j
k.y = a
k.u = f
f.q = k
f.u = k
f.p = m
f.z = j
d.r = m
d.s = m
d.p = m
d.u = i
d.v = e
d.q = k
e.p = a
e.v = a
e.w = a
e.q = b
e.u = m
e.r = j
n.p = a
i.w = b
i.t = d
i.q = d
m.p = a
m.v = a
m.w = a
m.q = b
m.u = e
m.r = j
assert j.q.z.u.y.x.p.p.z.txt == "j"