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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: C = None
        self.z: I = None
        self.p: F = None
        self.o: C = None
        self.u: H = None
        self.y: E = None
        self.v: I = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.u: A = None
        self.w: D = None
        self.z: A = None
        self.v: A = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: G = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.u: I = None
        self.y: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.o: D = None
        self.r: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: C = None
        self.z: I = None
        self.p: F = None
        self.o: C = None
        self.u: H = None
        self.y: E = None
        self.v: I = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.u: A = None
        self.w: D = None
        self.z: A = None
        self.v: A = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: G = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.u: I = None
        self.y: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.o: D = None
        self.r: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.txt = txt

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

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