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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: I = None
        self.x: D = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.z: B = None
        self.t: C = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.p: D = None
        self.x: D = None
        self.t: B = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: I = None
        self.x: D = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.z: B = None
        self.t: C = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.p: D = None
        self.x: D = None
        self.t: B = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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