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

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

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

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

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

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

l = A("l")
j = B("j")
k = C("k")
m = D("m")
g = E("g")
c = F("c")
a = F("a")
b = E("b")
n = E("n")

l.p = m
l.z = m
l.s = j
l.w = k
l.v = k
j.p = a
j.s = a
j.v = k
j.r = m
j.u = m
k.y = j
k.v = j
k.r = j
k.q = j
k.u = g
k.s = m
m.s = j
m.o = l
g.s = m
c.y = n
c.w = j
c.z = l
c.o = m
a.y = b
a.w = j
a.z = l
a.o = m
b.s = m
n.s = m
assert l.p.o.s.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: B = None
        self.w: C = None
        self.v: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

l = A("l")
j = B("j")
k = C("k")
m = D("m")
g = E("g")
c = F("c")
a = F("a")
b = E("b")
n = E("n")

l.p = m
l.z = m
l.s = j
l.w = k
l.v = k
j.p = a
j.s = a
j.v = k
j.r = m
j.u = m
k.y = j
k.v = j
k.r = j
k.q = j
k.u = g
k.s = m
m.s = j
m.o = l
g.s = m
c.y = n
c.w = j
c.z = l
c.o = m
a.y = b
a.w = j
a.z = l
a.o = m
b.s = m
n.s = m
assert l.p.o.s.r.o.txt == "l"