class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.r: E = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.o: C = None
        self.w: B = None
        self.p: B = None
        self.t: G = None
        self.txt = txt

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

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

f = A("f")
c = B("c")
e = C("e")
a = D("a")
k = E("k")
j = F("j")
b = G("b")
h = F("h")
d = A("d")
i = D("i")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.r: E = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.o: C = None
        self.w: B = None
        self.p: B = None
        self.t: G = None
        self.txt = txt

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

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

f = A("f")
c = B("c")
e = C("e")
a = D("a")
k = E("k")
j = F("j")
b = G("b")
h = F("h")
d = A("d")
i = D("i")

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