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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.v: B = None
        self.u: D = None
        self.t: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.v: B = None
        self.u: D = None
        self.t: A = None
        self.o: F = None
        self.txt = txt

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

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