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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: I = None
        self.u: B = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.z: A = None
        self.p: H = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: I = None
        self.o: E = None
        self.r: H = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: I = None
        self.u: B = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.z: A = None
        self.p: H = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: I = None
        self.o: E = None
        self.r: H = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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