class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: C = None
        self.o: D = None
        self.v: B = None
        self.p: D = None
        self.y: F = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: H = None
        self.p: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.w: C = None
        self.u: E = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.u: G = None
        self.y: G = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: H = None
        self.p: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.w: C = None
        self.u: E = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.u: G = None
        self.y: G = None
        self.p: G = None
        self.txt = txt

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

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