class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.o: A = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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