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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.u: D = None
        self.r: H = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

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

e = A("e")
j = B("j")
d = C("d")
g = D("g")
i = E("i")
c = F("c")
m = G("m")
k = H("k")
h = H("h")
l = E("l")

e.x = d
j.q = d
j.u = e
j.t = c
d.w = m
d.u = j
g.y = k
g.z = d
g.w = d
i.s = g
i.x = c
c.x = e
c.p = e
c.z = j
c.u = g
c.r = k
c.w = m
m.x = d
m.p = i
m.r = j
m.v = c
k.s = m
k.w = m
k.r = e
h.s = m
h.w = m
h.r = e
l.s = g
l.x = c
assert k.w.r.q.u.u.x.w.r.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.u: D = None
        self.r: H = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

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

e = A("e")
j = B("j")
d = C("d")
g = D("g")
i = E("i")
c = F("c")
m = G("m")
k = H("k")
h = H("h")
l = E("l")

e.x = d
j.q = d
j.u = e
j.t = c
d.w = m
d.u = j
g.y = k
g.z = d
g.w = d
i.s = g
i.x = c
c.x = e
c.p = e
c.z = j
c.u = g
c.r = k
c.w = m
m.x = d
m.p = i
m.r = j
m.v = c
k.s = m
k.w = m
k.r = e
h.s = m
h.w = m
h.r = e
l.s = g
l.x = c
assert k.w.r.q.u.u.x.w.r.t.z.txt == "j"