class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.q: D = None
        self.r: G = None
        self.u: G = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: F = None
        self.v: E = None
        self.p: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.u: C = None
        self.w: A = None
        self.r: A = None
        self.txt = txt

b = A("b")
g = B("g")
h = C("h")
k = D("k")
j = E("j")
c = F("c")
f = G("f")
m = A("m")
a = A("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: F = None
        self.v: E = None
        self.p: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.u: C = None
        self.w: A = None
        self.r: A = None
        self.txt = txt

b = A("b")
g = B("g")
h = C("h")
k = D("k")
j = E("j")
c = F("c")
f = G("f")
m = A("m")
a = A("a")

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