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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.o: G = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.q: F = None
        self.r: F = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.w: C = None
        self.txt = txt

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

h.w = f
h.r = k
h.y = i
h.o = l
h.q = j
l.s = i
l.t = j
l.z = k
i.t = n
i.u = j
n.p = i
n.u = h
n.o = j
n.s = k
k.p = l
k.z = f
g.x = h
g.s = h
g.q = f
g.r = f
g.p = l
g.o = j
j.q = f
j.y = h
j.w = i
f.x = h
f.s = h
f.q = g
f.r = g
f.p = l
f.o = j
assert l.t.y.y.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.y: C = None
        self.o: B = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.o: G = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.q: F = None
        self.r: F = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.w: C = None
        self.txt = txt

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

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