class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: E = None
        self.p: G = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.x: A = None
        self.q: F = None
        self.z: C = None
        self.v: D = None
        self.y: G = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: I = None
        self.r: D = None
        self.s: F = None
        self.q: D = None
        self.x: B = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.o: B = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: E = None
        self.p: G = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.x: A = None
        self.q: F = None
        self.z: C = None
        self.v: D = None
        self.y: G = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: I = None
        self.r: D = None
        self.s: F = None
        self.q: D = None
        self.x: B = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.o: B = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

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

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