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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.q: A = None
        self.t: B = None
        self.z: B = None
        self.w: D = None
        self.s: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.q: E = None
        self.v: F = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.q: A = None
        self.t: B = None
        self.z: B = None
        self.w: D = None
        self.s: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.q: E = None
        self.v: F = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.txt = txt

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

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