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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.w: E = None
        self.s: B = None
        self.x: B = None
        self.u: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

m = A("m")
n = B("n")
f = C("f")
j = D("j")
c = E("c")
k = F("k")
d = G("d")
e = D("e")
l = A("l")

m.y = c
m.p = n
m.r = f
n.q = c
n.y = j
f.u = c
j.r = f
j.x = c
j.s = e
c.q = e
c.u = k
k.p = n
k.s = n
k.x = n
k.u = n
k.v = e
k.w = c
k.q = m
d.y = k
d.z = m
d.w = f
d.q = n
e.r = f
e.x = c
e.s = j
l.y = c
l.p = n
l.r = f
assert n.y.s.s.r.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.w: E = None
        self.s: B = None
        self.x: B = None
        self.u: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

m = A("m")
n = B("n")
f = C("f")
j = D("j")
c = E("c")
k = F("k")
d = G("d")
e = D("e")
l = A("l")

m.y = c
m.p = n
m.r = f
n.q = c
n.y = j
f.u = c
j.r = f
j.x = c
j.s = e
c.q = e
c.u = k
k.p = n
k.s = n
k.x = n
k.u = n
k.v = e
k.w = c
k.q = m
d.y = k
d.z = m
d.w = f
d.q = n
e.r = f
e.x = c
e.s = j
l.y = c
l.p = n
l.r = f
assert n.y.s.s.r.u.u.txt == "k"