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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: D = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: D = None
        self.z: A = None
        self.p: F = None
        self.q: D = None
        self.o: H = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: D = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: D = None
        self.z: A = None
        self.p: F = None
        self.q: D = None
        self.o: H = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.u: E = None
        self.txt = txt

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

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

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