class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.s: F = None
        self.z: F = None
        self.y: B = None
        self.t: D = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.q: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.q: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

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