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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.v: A = None
        self.txt = txt

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

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

k.y = f
k.z = e
k.q = b
k.s = d
f.r = c
f.q = e
f.y = i
f.w = m
c.s = k
c.z = k
c.u = k
c.v = g
c.r = d
c.t = e
c.y = b
m.r = k
m.t = i
m.w = f
d.s = g
d.v = m
e.q = k
e.v = k
e.y = m
b.s = c
b.t = f
b.q = d
g.s = k
g.z = k
g.u = k
g.v = c
g.r = d
g.t = e
g.y = b
i.r = c
i.q = e
i.y = f
i.w = m
assert i.y.r.r.s.t.y.t.txt == "i"