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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.y: D = None
        self.s: A = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

e = A("e")
i = B("i")
m = C("m")
l = D("l")
f = E("f")
k = F("k")
h = G("h")
a = G("a")

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.y: D = None
        self.s: A = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

e = A("e")
i = B("i")
m = C("m")
l = D("l")
f = E("f")
k = F("k")
h = G("h")
a = G("a")

e.z = a
e.p = a
e.u = f
e.r = f
e.q = l
e.y = l
e.x = i
i.p = f
m.p = l
m.y = l
m.v = f
m.t = f
m.s = e
m.x = k
l.v = h
f.r = e
f.u = e
f.x = e
f.w = i
k.x = i
h.u = f
h.r = f
a.u = f
a.r = f
assert l.v.u.x.x.txt == "i"