class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: B = None
        self.v: G = None
        self.r: F = None
        self.o: C = None
        self.x: E = None
        self.w: G = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.w: F = None
        self.y: H = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.p: E = None
        self.w: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.w: F = None
        self.y: H = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.p: E = None
        self.w: C = None
        self.y: F = None
        self.txt = txt

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

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