class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.u: G = None
        self.x: H = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.v: F = None
        self.r: C = None
        self.s: B = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.r: C = None
        self.p: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
d = D("d")
m = E("m")
k = F("k")
g = G("g")
i = H("i")
l = H("l")
e = D("e")

c.r = g
c.x = l
a.y = e
a.t = m
a.p = g
a.u = d
a.q = c
a.r = k
j.q = c
j.t = c
j.y = l
j.x = l
j.u = g
d.r = a
m.w = j
m.u = j
m.r = j
m.v = k
m.o = k
m.s = a
k.v = c
k.u = l
k.y = a
k.w = j
k.p = j
g.q = m
g.y = d
g.p = d
g.r = j
g.o = k
g.x = k
i.v = d
i.o = c
i.r = k
i.w = k
l.v = d
l.o = c
l.r = k
l.w = k
e.r = a
assert m.u.u.q.v.v.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.u: G = None
        self.x: H = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.v: F = None
        self.r: C = None
        self.s: B = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.r: C = None
        self.p: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
d = D("d")
m = E("m")
k = F("k")
g = G("g")
i = H("i")
l = H("l")
e = D("e")

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