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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: A = None
        self.v: C = None
        self.w: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.q: H = None
        self.o: G = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: A = None
        self.v: C = None
        self.w: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.q: H = None
        self.o: G = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

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

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

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