class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.p: D = None
        self.o: D = None
        self.s: D = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: E = None
        self.q: F = None
        self.v: D = None
        self.t: A = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: G = None
        self.w: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: E = None
        self.q: F = None
        self.v: D = None
        self.t: A = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: G = None
        self.w: E = None
        self.txt = txt

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

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

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