class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: D = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.t: G = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: D = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.t: G = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

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