class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

i = A("i")
k = B("k")
l = C("l")
j = D("j")
f = E("f")
b = F("b")
a = G("a")
h = C("h")
g = G("g")

i.x = f
k.o = b
k.w = i
k.r = l
k.t = a
k.s = f
k.u = g
l.t = a
j.v = b
j.t = g
f.r = i
f.u = g
f.y = k
f.o = k
f.s = b
b.p = l
a.t = j
a.r = j
a.s = i
a.w = h
h.t = g
g.t = j
g.r = j
g.s = i
g.w = h
assert g.w.t.s.x.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

i = A("i")
k = B("k")
l = C("l")
j = D("j")
f = E("f")
b = F("b")
a = G("a")
h = C("h")
g = G("g")

i.x = f
k.o = b
k.w = i
k.r = l
k.t = a
k.s = f
k.u = g
l.t = a
j.v = b
j.t = g
f.r = i
f.u = g
f.y = k
f.o = k
f.s = b
b.p = l
a.t = j
a.r = j
a.s = i
a.w = h
h.t = g
g.t = j
g.r = j
g.s = i
g.w = h
assert g.w.t.s.x.s.p.txt == "l"