class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: D = None
        self.q: G = None
        self.s: F = None
        self.p: F = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: D = None
        self.s: C = None
        self.v: A = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: D = None
        self.s: C = None
        self.v: A = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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