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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: F = None
        self.x: D = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: B = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: F = None
        self.x: D = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: B = None
        self.v: A = None
        self.o: C = None
        self.txt = txt

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

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