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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.v: A = None
        self.x: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
c = C("c")
e = D("e")
n = E("n")
g = F("g")
l = G("l")

j.u = c
j.z = n
j.v = n
j.t = h
j.q = e
h.x = e
h.t = c
c.w = h
e.z = n
e.u = l
e.x = l
e.v = j
e.r = g
n.y = g
g.x = j
g.q = j
g.s = e
g.p = e
l.v = e
l.z = g
l.x = g
l.o = g
l.p = c
l.s = n
l.w = n
assert c.w.t.w.x.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.t: B = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.v: A = None
        self.x: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
c = C("c")
e = D("e")
n = E("n")
g = F("g")
l = G("l")

j.u = c
j.z = n
j.v = n
j.t = h
j.q = e
h.x = e
h.t = c
c.w = h
e.z = n
e.u = l
e.x = l
e.v = j
e.r = g
n.y = g
g.x = j
g.q = j
g.s = e
g.p = e
l.v = e
l.z = g
l.x = g
l.o = g
l.p = c
l.s = n
l.w = n
assert c.w.t.w.x.r.p.txt == "e"