class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.z: C = None
        self.u: E = None
        self.x: A = None
        self.t: F = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.z: C = None
        self.u: E = None
        self.x: A = None
        self.t: F = None
        self.y: G = None
        self.txt = txt

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

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

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