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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.r: H = None
        self.x: A = None
        self.z: G = None
        self.t: C = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.y: C = None
        self.p: E = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

h = A("h")
d = B("d")
c = C("c")
l = D("l")
g = E("g")
i = F("i")
b = G("b")
e = H("e")
k = G("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.r: H = None
        self.x: A = None
        self.z: G = None
        self.t: C = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.y: C = None
        self.p: E = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

h = A("h")
d = B("d")
c = C("c")
l = D("l")
g = E("g")
i = F("i")
b = G("b")
e = H("e")
k = G("k")

h.u = d
h.w = d
h.s = c
h.t = i
h.q = l
d.t = h
d.p = g
d.u = g
d.q = g
c.s = g
c.u = g
c.r = l
l.p = h
l.x = h
l.u = h
l.s = g
l.r = e
l.z = k
l.o = k
l.t = c
g.x = e
g.s = c
i.u = e
i.t = c
b.w = c
b.z = c
b.y = c
b.p = g
b.x = g
b.o = g
e.v = k
e.y = g
e.t = b
k.w = c
k.z = c
k.y = c
k.p = g
k.x = g
k.o = g
assert c.r.r.y.s.r.o.y.r.txt == "l"