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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: A = None
        self.x: D = None
        self.z: D = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.q: E = None
        self.t: D = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: A = None
        self.x: D = None
        self.z: D = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.q: E = None
        self.t: D = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: B = None
        self.r: C = None
        self.txt = txt

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

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

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