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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: D = None
        self.x: G = None
        self.w: D = None
        self.u: E = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.u: D = None
        self.p: C = None
        self.o: D = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: D = None
        self.x: G = None
        self.w: D = None
        self.u: E = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.u: D = None
        self.p: C = None
        self.o: D = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

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

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