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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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