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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

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

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

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