class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: G = None
        self.u: C = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.y: D = None
        self.u: H = None
        self.x: A = None
        self.r: D = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: G = None
        self.o: F = None
        self.y: F = None
        self.w: D = None
        self.v: H = None
        self.q: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: F = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.y: D = None
        self.u: H = None
        self.x: A = None
        self.r: D = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: G = None
        self.o: F = None
        self.y: F = None
        self.w: D = None
        self.v: H = None
        self.q: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: F = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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