class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.z: E = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.w: F = None
        self.z: A = None
        self.s: A = None
        self.v: C = None
        self.x: H = None
        self.u: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.x: G = None
        self.z: H = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: E = None
        self.r: B = None
        self.s: A = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

i = A("i")
f = B("f")
a = C("a")
b = D("b")
j = E("j")
l = F("l")
n = G("n")
e = H("e")
k = H("k")
m = G("m")

i.y = b
i.w = k
f.r = b
f.y = n
f.p = a
a.o = b
a.v = b
a.z = j
a.u = l
b.q = e
b.x = e
b.u = e
b.p = m
b.w = l
b.z = i
b.s = i
b.v = a
j.q = b
l.v = b
l.y = n
l.z = i
l.o = f
l.s = m
n.r = j
n.y = b
n.x = m
n.z = e
n.o = f
n.p = i
e.y = k
e.w = j
e.r = f
e.v = f
e.s = i
e.t = i
k.y = e
k.w = j
k.r = f
k.v = f
k.s = i
k.t = i
m.r = j
m.y = b
m.x = n
m.z = k
m.o = f
m.p = i
assert f.r.p.p.y.p.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.z: E = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.w: F = None
        self.z: A = None
        self.s: A = None
        self.v: C = None
        self.x: H = None
        self.u: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.x: G = None
        self.z: H = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: E = None
        self.r: B = None
        self.s: A = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

i = A("i")
f = B("f")
a = C("a")
b = D("b")
j = E("j")
l = F("l")
n = G("n")
e = H("e")
k = H("k")
m = G("m")

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