class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.s: A = None
        self.u: F = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.p: F = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

m = A("m")
l = B("l")
c = C("c")
h = D("h")
b = E("b")
i = F("i")
f = G("f")
n = E("n")
j = D("j")

m.u = l
m.v = i
m.y = b
l.w = h
l.y = m
l.s = m
l.t = m
l.z = m
l.p = n
c.z = h
c.p = b
c.x = f
c.q = f
c.o = j
c.r = j
h.s = f
h.r = m
b.p = f
b.w = f
b.s = m
b.u = i
b.t = h
i.z = l
i.w = f
i.u = m
f.z = n
f.r = i
f.p = i
f.q = m
f.s = c
n.p = f
n.w = f
n.s = m
n.u = i
n.t = h
j.s = f
j.r = m
assert c.p.t.s.p.z.w.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.s: A = None
        self.u: F = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.p: F = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

m = A("m")
l = B("l")
c = C("c")
h = D("h")
b = E("b")
i = F("i")
f = G("f")
n = E("n")
j = D("j")

m.u = l
m.v = i
m.y = b
l.w = h
l.y = m
l.s = m
l.t = m
l.z = m
l.p = n
c.z = h
c.p = b
c.x = f
c.q = f
c.o = j
c.r = j
h.s = f
h.r = m
b.p = f
b.w = f
b.s = m
b.u = i
b.t = h
i.z = l
i.w = f
i.u = m
f.z = n
f.r = i
f.p = i
f.q = m
f.s = c
n.p = f
n.w = f
n.s = m
n.u = i
n.t = h
j.s = f
j.r = m
assert c.p.t.s.p.z.w.r.u.txt == "l"