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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.u: H = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.u: H = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

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