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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.q: D = None
        self.s: F = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

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

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

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

h = A("h")
m = B("m")
k = C("k")
b = D("b")
d = E("d")
n = F("n")

h.v = d
h.x = k
h.t = k
m.u = n
m.o = n
m.r = n
m.z = h
k.t = b
k.q = b
k.u = m
k.o = m
k.s = n
k.r = d
b.r = m
d.x = b
d.t = b
d.y = n
d.s = n
n.w = d
assert h.v.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.q: D = None
        self.s: F = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

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

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

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

h = A("h")
m = B("m")
k = C("k")
b = D("b")
d = E("d")
n = F("n")

h.v = d
h.x = k
h.t = k
m.u = n
m.o = n
m.r = n
m.z = h
k.t = b
k.q = b
k.u = m
k.o = m
k.s = n
k.r = d
b.r = m
d.x = b
d.t = b
d.y = n
d.s = n
n.w = d
assert h.v.x.r.txt == "m"