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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: G = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: G = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

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

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

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