class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

e = A("e")
c = B("c")
g = C("g")
h = D("h")
i = E("i")
n = F("n")
k = A("k")
f = E("f")
l = E("l")
b = E("b")

e.u = b
e.s = n
e.w = g
c.t = g
c.u = e
c.v = n
g.x = n
h.s = f
h.z = c
i.t = g
i.s = h
i.z = c
n.y = e
n.r = c
n.v = b
n.s = g
n.w = g
k.u = f
k.s = n
k.w = g
f.t = g
f.s = h
f.z = c
l.t = g
l.s = h
l.z = c
b.t = g
b.s = h
b.z = c
assert l.t.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

e = A("e")
c = B("c")
g = C("g")
h = D("h")
i = E("i")
n = F("n")
k = A("k")
f = E("f")
l = E("l")
b = E("b")

e.u = b
e.s = n
e.w = g
c.t = g
c.u = e
c.v = n
g.x = n
h.s = f
h.z = c
i.t = g
i.s = h
i.z = c
n.y = e
n.r = c
n.v = b
n.s = g
n.w = g
k.u = f
k.s = n
k.w = g
f.t = g
f.s = h
f.z = c
l.t = g
l.s = h
l.z = c
b.t = g
b.s = h
b.z = c
assert l.t.x.s.txt == "g"