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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.x: D = None
        self.r: B = None
        self.t: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.u: D = None
        self.r: I = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

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

g = A("g")
b = B("b")
f = C("f")
e = D("e")
j = E("j")
i = F("i")
h = G("h")
k = H("k")
m = I("m")

g.r = h
g.t = e
b.t = i
b.p = e
f.r = m
f.q = g
f.y = b
f.v = h
f.t = j
e.q = f
e.z = f
e.s = i
j.s = g
j.u = g
j.q = e
j.p = h
j.r = h
j.y = f
j.z = f
i.v = f
i.y = h
i.o = h
i.x = e
i.r = b
i.t = j
h.y = j
k.t = j
k.p = b
k.v = b
k.u = e
k.r = m
k.z = g
m.u = b
m.z = b
m.o = j
m.w = g
m.q = i
m.x = i
m.y = i
m.r = i
assert b.p.s.v.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.x: D = None
        self.r: B = None
        self.t: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.u: D = None
        self.r: I = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

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

g = A("g")
b = B("b")
f = C("f")
e = D("e")
j = E("j")
i = F("i")
h = G("h")
k = H("k")
m = I("m")

g.r = h
g.t = e
b.t = i
b.p = e
f.r = m
f.q = g
f.y = b
f.v = h
f.t = j
e.q = f
e.z = f
e.s = i
j.s = g
j.u = g
j.q = e
j.p = h
j.r = h
j.y = f
j.z = f
i.v = f
i.y = h
i.o = h
i.x = e
i.r = b
i.t = j
h.y = j
k.t = j
k.p = b
k.v = b
k.u = e
k.r = m
k.z = g
m.u = b
m.z = b
m.o = j
m.w = g
m.q = i
m.x = i
m.y = i
m.r = i
assert b.p.s.v.y.t.txt == "i"