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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: H = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.z: B = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.r: F = None
        self.s: A = None
        self.y: B = None
        self.p: G = None
        self.t: C = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.y: C = None
        self.o: F = None
        self.t: H = None
        self.q: E = None
        self.x: C = None
        self.txt = txt

c = A("c")
b = B("b")
f = C("f")
g = D("g")
i = E("i")
k = F("k")
l = G("l")
d = H("d")
a = I("a")

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: H = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.z: B = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.r: F = None
        self.s: A = None
        self.y: B = None
        self.p: G = None
        self.t: C = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.y: C = None
        self.o: F = None
        self.t: H = None
        self.q: E = None
        self.x: C = None
        self.txt = txt

c = A("c")
b = B("b")
f = C("f")
g = D("g")
i = E("i")
k = F("k")
l = G("l")
d = H("d")
a = I("a")

c.x = k
c.r = k
c.s = f
c.y = f
c.t = i
b.q = d
f.w = c
f.o = c
f.s = d
g.y = c
i.o = d
i.t = c
i.y = c
i.p = a
k.p = i
k.w = i
k.t = g
k.z = b
k.x = c
l.t = k
l.z = k
d.v = g
d.z = a
d.r = k
d.s = c
d.y = b
d.p = l
d.q = l
d.t = f
a.w = f
a.y = f
a.x = f
a.r = d
a.t = d
a.o = k
a.q = i
assert b.q.t.o.t.o.t.w.r.txt == "k"