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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.v: C = None
        self.y: A = None
        self.u: D = None
        self.o: A = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.x: E = None
        self.w: H = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.v: C = None
        self.y: A = None
        self.u: D = None
        self.o: A = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.x: E = None
        self.w: H = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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