class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.z: C = None
        self.v: C = None
        self.o: H = None
        self.x: G = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: F = None
        self.u: G = None
        self.p: H = None
        self.t: A = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: F = None
        self.u: G = None
        self.p: H = None
        self.t: A = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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