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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: C = None
        self.u: C = None
        self.s: A = None
        self.r: A = None
        self.y: D = None
        self.txt = txt

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

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

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

a.u = i
a.x = i
a.o = n
a.t = m
a.s = l
a.v = c
g.s = m
g.w = i
g.y = h
g.t = l
m.s = k
m.p = k
m.q = i
m.t = c
m.x = h
l.q = m
l.o = m
l.u = k
l.s = e
l.r = e
l.y = c
h.u = n
i.r = g
e.u = i
e.x = i
e.o = a
e.t = k
e.s = c
e.v = l
k.s = m
k.p = m
k.q = i
k.t = c
k.x = h
c.q = m
c.o = m
c.u = m
c.s = a
c.r = n
c.y = l
n.u = i
n.x = i
n.o = a
n.t = k
n.s = l
n.v = l
assert h.u.o.x.r.y.u.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.o: A = None
        self.t: C = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: C = None
        self.u: C = None
        self.s: A = None
        self.r: A = None
        self.y: D = None
        self.txt = txt

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

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

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

a.u = i
a.x = i
a.o = n
a.t = m
a.s = l
a.v = c
g.s = m
g.w = i
g.y = h
g.t = l
m.s = k
m.p = k
m.q = i
m.t = c
m.x = h
l.q = m
l.o = m
l.u = k
l.s = e
l.r = e
l.y = c
h.u = n
i.r = g
e.u = i
e.x = i
e.o = a
e.t = k
e.s = c
e.v = l
k.s = m
k.p = m
k.q = i
k.t = c
k.x = h
c.q = m
c.o = m
c.u = m
c.s = a
c.r = n
c.y = l
n.u = i
n.x = i
n.o = a
n.t = k
n.s = l
n.v = l
assert h.u.o.x.r.y.u.u.r.txt == "g"