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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.w: F = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
l = C("l")
a = D("a")
f = E("f")
j = F("j")
h = G("h")
d = E("d")

g.w = l
g.z = a
k.y = d
k.t = j
k.w = l
k.z = l
k.o = l
l.y = g
l.x = g
l.u = j
a.r = k
f.t = a
f.y = d
f.w = j
f.s = l
f.x = h
j.p = f
j.w = d
j.u = l
j.r = k
j.s = g
h.y = d
h.x = j
h.r = k
d.t = a
d.y = f
d.w = j
d.s = l
d.x = h
assert k.y.s.u.p.x.y.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.w: F = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
l = C("l")
a = D("a")
f = E("f")
j = F("j")
h = G("h")
d = E("d")

g.w = l
g.z = a
k.y = d
k.t = j
k.w = l
k.z = l
k.o = l
l.y = g
l.x = g
l.u = j
a.r = k
f.t = a
f.y = d
f.w = j
f.s = l
f.x = h
j.p = f
j.w = d
j.u = l
j.r = k
j.s = g
h.y = d
h.x = j
h.r = k
d.t = a
d.y = f
d.w = j
d.s = l
d.x = h
assert k.y.s.u.p.x.y.s.u.txt == "j"